%http://code.google.com/p/medicalip/source/browse/1

clc;
addpath('lib');

imgA1 = 'img/DM.nii';
imgA2 = 'img/DM_out.nii';
imgA3 = 'img/DM_ground_truth.nii';

imgB1 = 'img/ET.nii';
imgB2 = 'img/ET_out.nii';
imgB3 = 'img/ET_ground_truth.nii';

imgC1 = 'img/DW.nii';
imgC2 = 'img/DW_out.nii';
imgC3 = 'img/DW_ground_truth.nii';


%findByThreshold(imgA1,100,250,imgA2);

expandFromPoint3(imgB1,45,imgB2);
%expandFromPoint(imgB1,45,3,imgB2);

imgC1 = 'img/DW_2.nii';
imgC2 = 'img/DW_2_out.nii';
%SegmentKidney(imgC1,imgC2);

d = 'img/DW_ground_truth.nii';
%evaluateSegmantation(fout,d);

return

img = imread('img/tst.gif');
figure(1);
imshow(img);

J=filter_erosion(img,5);
figure(2);
imshow(J);

J=filter_dilation(img,5);
figure(3);
imshow(J);
